<template>
  <el-dialog title="查看资料" :visible.sync="dialogVisible" v-if="dialogVisible" top="200px" width="620px">
    <div v-if="goodsInfo">
      <el-descriptions title="" :column="2" border>
        <el-descriptions-item label="游戏账号">{{goodsInfo.accountNumber}}</el-descriptions-item>
        <el-descriptions-item label="密码">{{goodsInfo.accountPassword}}</el-descriptions-item>
        <el-descriptions-item label="手机号">{{goodsInfo.securityPhone}}</el-descriptions-item>
        <el-descriptions-item label="卡位编号">{{telInfo.num||'暂无'}}</el-descriptions-item>
        <el-descriptions-item label="成本价">{{goodsInfo.costPrice}}
        </el-descriptions-item>
        <el-descriptions-item label="其他信息">{{goodsInfo.importantRemark}}</el-descriptions-item>
      </el-descriptions>
    </div>
    <div class="center">
      <el-button size="small" @click="dialogVisible = false">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import goodsListApi from "../../../api/gameConfig/goodsList";
export default {
  name: "",
  data() {
    return {
      dialogVisible: false,
      loading: false,
      goodsInfo: null,
      telInfo:{}
    };
  },
  created() {},
  methods: {
    open(goodsInfo) {
      console.log("%c Line:40 🥖 goodsInfo", "color:#ed9ec7", goodsInfo);
      this.goodsInfo = goodsInfo;
      this.dialogVisible = true;
      this.getTelInfo();
    },
    getTelInfo() {
      if (!this.goodsInfo.telid) {
        return;
      }
      goodsListApi.getaccountTelinfo(this.goodsInfo.telid).then((res) => {
        if(res.data) this.telInfo = res.data
        
      });
    },

    close() {
      this.dialogVisible = false;
    },
  },
};
</script>
<style scoped lang="css">
.center {
  text-align: center;
  padding-top: 20px;
}
</style>
